﻿@model IEnumerable<OurWedding1.Models.Guest>
@using OurWedding1

<table style="width:100%">
    <tr>
        <th>

            @Html.DisplayNameFor(model => model.Name)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.GuestFunction)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.GuestGroup)
        </th>
        <th>Hotel?</th>
        <th>Potw</th>
    </tr>

    @foreach (var item in Model)
    {
        <tr>
            <td>
                @Html.ActionLink(item.Name, "Details", new { id = item.GuestId })
            </td>
            <td>
                @(item.GuestFunction == null ? @Resources.None : item.GuestFunction.Name)
            </td>
            <td>
                @(item.GuestGroup == null ? @Resources.None : item.GuestGroup.Name)
            </td>
            <td>@Html.DisplayFor(modelItem=>item.isHotelNeeded)</td>
            <td>@Html.DisplayFor(modelItem=>item.isConfirmed)</td>
        </tr>
    }

</table>
